home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / mod2tutb.zip / PROCED1.MOD < prev    next >
Text File  |  1989-01-18  |  848b  |  51 lines

  1.                                          (* Chapter 5 - Program 1 *)
  2. MODULE Proced1;
  3.  
  4. FROM InOut IMPORT WriteString, WriteLn;
  5.  
  6. VAR Count : INTEGER;
  7.  
  8. PROCEDURE WriteHeader;
  9. BEGIN
  10.    WriteString("This is the header");
  11.    WriteLn;
  12. END WriteHeader;
  13.  
  14. PROCEDURE WriteMessage;
  15. BEGIN
  16.    WriteString("This is the message");
  17.    WriteLn;
  18. END WriteMessage;
  19.  
  20. PROCEDURE WriteEnding;
  21. BEGIN
  22.    WriteString("This is the end");
  23.    WriteLn;
  24. END WriteEnding;
  25.  
  26. BEGIN        (* Main program *)
  27.    WriteHeader;
  28.    FOR Count := 1 TO 8 DO
  29.       WriteMessage;
  30.    END;
  31.    WriteEnding;
  32. END Proced1.
  33.  
  34.  
  35.  
  36.  
  37. (* Result of execution
  38.  
  39. This is the header
  40. This is the message
  41. This is the message
  42. This is the message
  43. This is the message
  44. This is the message
  45. This is the message
  46. This is the message
  47. This is the message
  48. This is the end
  49.  
  50. *)
  51.